package zombie;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

public class Test {
    public static void main(String[] args) {
        // 读取图片文件
        BufferedImage bufferedImage = null;
        try {
            bufferedImage = ImageIO.read(new File("D:\\教程\\projectone\\基础\\src\\main\\java\\zombie\\zombie00.png"));
//            BufferedImage img = ImageIO.read(Test.class.getResource("zombie00.png"));
            System.out.println(Test.class.getResource(""));
        } catch (IOException e) {
            e.printStackTrace();
        }

        System.out.println("width: " + bufferedImage.getWidth());
        System.out.println("height: " + bufferedImage.getHeight());
    }
}
